// 分转元
const fenToYuan = (number) => {
  if (number) {
    number = number + "";
    let result = "";
    switch (number.length) {
      case 1:
        result = `0.0${number}`;
        break;
      case 2:
        result = `0.${number}`;
        break;
      default:
        result = `${number.substring(0, number.length - 2)}.${number.substring(
          number.length - 2
        )}`;
        break;
    }
    return result;
  } else {
    return 0;
  }
};
export default fenToYuan;
